home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-21 | 445 b | 23 lines | [TEXT/ttxt] |
- //-------------------------------------------------------------------//
-
- // Syntax: fliplr ( A )
-
- // Description:
-
- // fliplr flips all the elements of a vector (or matrix) from left to
- // right.
-
- //-------------------------------------------------------------------//
-
- fliplr = function(A)
- {
- local(B);
- if (class (A) != "num")
- {
- error("fliplr: Only matrix arguments supported");
- }
-
- B[;1:A.nc] = A[;A.nc:1:-1];
- return B;
- };
-